package com.buchong.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.buchong.mapper.Order_DemoMapper;
import com.buchong.pojo.Order_Demo;
import com.buchong.service.Order_De_Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional

public class ImOrder_demo extends ServiceImpl<Order_DemoMapper,Order_Demo> implements Order_De_Service {
    @Autowired
    private Order_DemoMapper order_demoMapper;

    @Override
    public List<Order_Demo> find(Integer uid) {
        return order_demoMapper.findAll(uid);
    }

    @Override
    public int upOne(Order_Demo order_demo) {
        return order_demoMapper.updateById(order_demo);
    }

    @Override
    public int delOne(Integer id) {
        return order_demoMapper.deleteById(id);
    }

    @Override
    public List<Order_Demo> findAll(Integer uid, Integer type) {
        return order_demoMapper.find(uid,type);
    }

    @Override
    public int add(Order_Demo order_demo) {
        return order_demoMapper.add(order_demo);
    }

    @Override
    public Order_Demo sel(String time) {
        return order_demoMapper.sel(time);
    }
}
